<!doctype html>
<html>

<head>
    <#import "spring.ftl" as spring>
        <title>
            <@spring.message code="title" />
        </title>
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" href="/bootstrap-3.3.7-dist/css/bootstrap.min.css">
        <link rel=stylesheet type=text/css href="/style.css" />
        <link rel="stylesheet" type="text/css" href="/highlight-theme-github.css" />
        <script src="/highlight.pack.js"></script>
</head>

<body>
    <div class="container">
        <div class="row">
            <#include "/nav.ftl">
        </div>
        <div class="well">
            <h2> <@spring.message code="system.edit" /> ${ card.id }</h2>
            <form action="/edit_card" method="post" class="cardForm">

                <div class="form-group">
                    <label for="general" class="btn btn-default btn-lg"><@spring.message code="system.General"/> &nbsp;
                    <input type="radio" name="type" value="1"
                           id="general" 
                            <#if card.type == 1>
                    checked
                    </#if>
                             />
                </label>
                    <label for="code" class="btn btn-default btn-lg"><@spring.message code="system.Code"/> &nbsp;
                    <input type="radio" name="type" value="2" id="code" 
                    <#if card.type == 2>
                    checked
                    </#if>
                      />
                </label>
                </div>
                <div class="form-group">
                    <label for="front"><@spring.message code="system.front"/></label>
                    <input type="text" name="front" id="front" class="form-control" value="${card.front}">
                </div>
                <div class="form-group">
                    <label for="back"><@spring.message code="system.back"/></label>
                    <textarea name="back" class="form-control" id="back" placeholder="back of card" rows="12">${card.back}</textarea>
                </div>
                <div class="row">
                    <div class="col-xs-6">
                        <div class="checkbox">
                            <label>
                            <input type="checkbox" name="known"
                               value="1"
                               <#if card.known==1>
                               checked
                               </#if> 
                               /> <@spring.message code="system.Known"/>
                        </label>
                        </div>
                    </div>
                    <div class="col-xs-6 text-right">
                        <a href="/delete/${card.id}" class="btn btn-danger btn-xs">
                            <i class="fa fa-trash"></i> <@spring.message code="system.remove"/>
                        </a>
                    </div>
                </div>

                <hr />
                <div class="form-group">
                    <input type="hidden" name="id" value="${card.id}" />
                    <button type="submit" class="saveButton btn btn-lg btn-primary"><@spring.message code="system.save"/></button>
                </div>
            </form>
        </div>
    </div>
    <script src="/jquery-2.2.4.min.js"></script>
    <script src="/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
    <script src="/8cea844162.js"></script>
    <script src="/fastclick.min.js"></script>
    <script src="/cards-show-ctrl.js" type="text/javascript"></script>
</body>

</html>